﻿using System;
using System.Collections.Generic;
using System.Text;
using BF.Model;
using BF.IDAL.BaseSystem;
using BF.Infrastructure;

namespace BF.SQLServerDAL.BaseSystem
{
    public class Sys_FunctionDAL : DALBase<sys_Function, WSJD_BaseFrameworkEntities>, 
        Isys_FunctionDAL
    {
        public Sys_FunctionDAL(IDatabaseFactory<WSJD_BaseFrameworkEntities> 
            databaseFactory)
            : base(databaseFactory)
        {
            
        }

        /// <summary>
        /// 修改操作
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public bool Update(sys_Function entity)
        {
            //DataContext.Attach(entity);
            DataContext.ApplyCurrentValues("sys_Function",entity);
            return DataContext.SaveChanges()>0;
        }
    }
}
